#autoload

local -Pi len=$(( ${@[(i)(-|--)]} - 1 ))
(( len < $# )) &&
    return len

len=${@[(I)-*]}
[[ $@[len] == -*[PSpsiIdJVXxrRWFMOAD] ]] &&
    (( len++ ))
return len
